package top.laoshuzi.designpatterns.base.behavior.command;

/**
 * 请求者
 */
public class Invoker {

    private Command command1;
    private Command command2;
    private Command command3;
    private Command command4;


    public void setCommand1(Command command1) {
        this.command1 = command1;
    }

    public void setCommand2(Command command2) {
        this.command2 = command2;
    }

    public void setCommand3(Command command3) {
        this.command3 = command3;
    }

    public void setCommand4(Command command4) {
        this.command4 = command4;
    }

    public void action1() {
        command1.execute();
    }

    public void action2() {
        command2.execute();
    }

    public void action3() {
        command3.execute();
    }

    public void action4() {
        command4.execute();
    }
}
